home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / DEMON / RISCOS2 / TCP_131S.ARC / h / session < prev    next >
Text File  |  1994-01-02  |  2KB  |  54 lines

  1. #include "Terminal.h"
  2.  
  3. extern int mode;
  4. #define CMD_MODE        1       /* Command mode */
  5. #define CONV_MODE       2       /* Converse mode */
  6.  
  7. /* Session control structure; only one entry is used at a time */
  8. struct session
  9. {
  10.         int type;
  11. #define FREE    0
  12. #define TELNET  1
  13. #define FTP     2
  14. #define AX25TNC 3
  15. #define FINGER  4
  16. #define NRSESSION 5
  17.  
  18.         char *name;     /* Name of remote host */
  19.         union
  20.         {
  21.                 struct ftp     *ftp;
  22.                 struct telnet  *telnet;
  23.                 struct ax25_cb *ax25_cb;
  24.                 struct finger  *finger;
  25.                 struct nr4cb   *nr4_cb ;
  26.         } cb;
  27.         void (*parse)();        /* Where to hand typed input when conversing */
  28.         FILE *record;           /* Receive record file */
  29.         char *rfile;            /* Record file name */
  30.         FILE *upload;           /* Send file */
  31.         char *ufile;            /* Upload file name */
  32.         Terminal *window;       /* Window structure handle */
  33.         int  echo;
  34.         int  raw;
  35.         int  keypad;
  36. };
  37. #define NULLSESSION     (struct session *)0
  38. extern unsigned nsessions;
  39. extern struct session *sessions;
  40. extern struct session *current;
  41.  
  42. int dosession(int, char **);
  43. int go(struct session *);
  44. int doclose(int, char **);
  45. int doreset(int, char **);
  46. int dokick(int, char **);
  47. struct session *newsession(void);
  48. void freesession(struct session *);
  49. int dorecord(int, char **);
  50. int doupload(int, char **);
  51. void close_sess(struct session *);                         
  52.  
  53. extern int16 lport;
  54.